import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        Scanner stdIn=new Scanner(System.in);
        int i,j,n,k;
        System.out.print("选择层数：");
        k=stdIn.nextInt();
        for (i = 1; i <= k; i++) {
            for (n = 1; n <= k-i; n++)
                System.out.print(" ");
            for (j = 1; j <= i; j++)
                System.out.print(j);
            for (j=i-1;j>=1;j--)
                System.out.print(j);
                System.out.println();


        }
    }
}
